/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package proj5labbd.graphics.tipoFuncionario;

import java.awt.Dimension;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import proj5labbd.DBInterface;
import proj5labbd.graphics.MainFrame;
import proj5labbd.graphics.abstractOpGraphics.OperationFrame;

/**
 *
 * @author yole
 */
public class TipoFuFrame extends OperationFrame {
    
    private final int width = 400;
    private final int height = 600;
    
    public TipoFuFrame(MainFrame frame, DBInterface dbInterface) {
        super(frame);
        this.setTitle("Tipo de funcionário");
        this.setDefaultCloseOperation(TipoFuFrame.DISPOSE_ON_CLOSE);
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        this.setBounds((dim.width - width)/2, (dim.height - height)/2, width, height);
        addPanel(new TipoFuInsertPanel(this,dbInterface),OpPanel.INSERT);
        addPanel(new TipoFuViewPanel(this,dbInterface),OpPanel.VIEW);
        addPanel(new TipoFuRmPanel(this,dbInterface),OpPanel.REMOVE);
        super.jtbbOperation.addTab("Insert", null, insertPanel, "Inserção de tipo de funcionário");
        super.jtbbOperation.setMnemonicAt(0, KeyEvent.VK_1);
        super.jtbbOperation.addTab("View", null, viewPanel, "Visualização de tipo de funcionário");
        super.jtbbOperation.setMnemonicAt(1, KeyEvent.VK_2);
        super.jtbbOperation.addTab("Remove", null, rmPanel, "Remoção de tipo de funcionário");
        super.jtbbOperation.setMnemonicAt(2, KeyEvent.VK_3);
    }
    
}
